﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRecetaEdicion.aspx.cs" Inherits="WebMenu.Pagina.Mantenimiento.frmRecetaEdicion" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <link href="../../style/css/smoothness/jquery-ui.css" rel="stylesheet" />
    <script src="../../style/script/jquery-1.11.2.js"></script>
    <script src="../../style/script/jquery-ui.js"></script>
        <style type="text/css">
        /*#region name */
        .ocultar {
            display: none;
        }
        /*#endregion */
            </style>
    <br><br><br>
    <asp:UpdatePanel ID="upRegistro" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ddlTipo" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="ddlClase" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="ddlTipoProd" EventName="SelectedIndexChanged" />
            <asp:AsyncPostBackTrigger ControlID="ddlProd" EventName="SelectedIndexChanged" />
        </Triggers>        
        <ContentTemplate>

            <asp:HiddenField ID="hdId" runat="server" />
            <table>
                <tr>
                    <td></td>
                    <td></td>
                    <td>
                        &nbsp;</td>
                    <td></td>
                    <td></td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td style="text-align: right;">Plato para el :</td>
                    <td>
                        <asp:DropDownList ID="ddlTipo" runat="server" AutoPostBack="true">
                        </asp:DropDownList>
                    </td>
                    <td>&nbsp;</td>
                    <td style="text-align: right;">Clase de Plato:</td>
                    <td>
                        <asp:DropDownList ID="ddlClase" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td style="text-align: right;">Receta : </td>
                    <td colspan="4">
                        <asp:TextBox ID="txtRecetaE" runat="server" ></asp:TextBox>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td style="text-align: right;">Estado :</td>
                    <td>
                        <asp:CheckBox ID="chbEstado" runat="server" />
                    </td>
                    <td>&nbsp;</td>
                    <td style="text-align: right;">&nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td style="text-align: right;">Tipo de Producto :</td>
                    <td>
                        <asp:DropDownList ID="ddlTipoProd" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlTipoProd_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                    <td></td>
                    <td style="text-align: right;">Producto :</td>
                    <td>
                        <asp:DropDownList ID="ddlProd" runat="server" AutoPostBack="true">
                        </asp:DropDownList>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td style="vertical-align: top">&nbsp;</td>
                    <td style="vertical-align: top">&nbsp;</td>
                    <td style="vertical-align: top">&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>
                        <asp:Button ID="btnAgregar" runat="server" OnClick="btnAgregar_Click" Text="Producto" />
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td colspan="4" rowspan="2" style="vertical-align: top">
                        <asp:GridView ID="gvProducto" runat="server" AutoGenerateColumns="False" OnRowDeleting="gvProducto_RowDeleting" >
                            <Columns>
                                <asp:CommandField CausesValidation="False" InsertVisible="False" ShowCancelButton="False" ShowDeleteButton="True" />
                                <asp:BoundField DataField="DESC_TPROD" HeaderText="Tipo Producto" />
                                <asp:BoundField DataField="NOM_PROD" HeaderText="Producto" />
                                <asp:BoundField DataField="ID_TPROD" HeaderStyle-CssClass="ocultar" HeaderText="IdTipoProd" ItemStyle-CssClass="ocultar" />
                                <asp:BoundField DataField="ID_PRODUCTO" HeaderStyle-CssClass="ocultar" HeaderText="IdProd" ItemStyle-CssClass="ocultar" />
                            </Columns>
                        </asp:GridView>
                    </td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td></td>
                    <td style="text-align: right;" colspan="5">
                        <asp:Button ID="btnGrabar" runat="server" Text="Grabar" OnClick="btnGrabar_Click" />
                        <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" OnClick="btnCancelar_Click" />
                    </td>
                    <td>&nbsp;</td>
                </tr>
            </table>            
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
